<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <include file="Public/meta" />
</head>
<body>
    <div class="info-center">
        <div class="page-header">
            <div class="pull-left">
                <h4>一级代理列表:</h4>
            </div>
            <a href="{:U('agent/add_admin')}"  class="btn btn-primary pull-right margin-top">添加代理商</a>
        </div>
        <h5>一级代理商列表（共{$num}条记录）</h5>
        <form action="" method="post">
            <input type="text" name="agent_name" value="{$agent_name}" placeholder="请输入代理商名称" />
            <input type="submit" value="搜索"/>
        </form>
        <div class="clearfix"></div>
        <div class="table-margin">
            <table class="table table-hover table-header" id="list-table">
                <thead>
                    <tr>
                        <td>代理商id</td>
                        <td>代理账号</td>
                        <td>等级</td>
                        <td>上级</td>
                        <td>手机号码</td>
                        <td class="w20">代理商详情</td>
                        <td>登陆时间</td>
                        <td>登陆IP</td>
                        <td>运营商折扣率编辑记录</td>
                        <td>状态</td>
                        <td class="w10">操作</td>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="list" item="vo">
                        <tr>
                            <td>{$vo['admin_id']}</td>
                            <td>{$vo['admin_name']}</td>
                            <td>
                                <if condition="$vo.dengji eq 1">
                                     一级代理
                                 <else/>
                                     没有等级
                                 </if>   
                            </td>
                            <td>{$vo['shangjiname']}</td>
                            <td>{$vo['phone']}</td>
                            <td>
                                <a href="{:U('agent/edit_one_agent',array('id'=>$vo['admin_id']))}"> 编辑</a>
                                <a href="{:U('agent/change_pwd_by_agent_id',array('id'=>$vo['admin_id']))}"> 修改密码</a>
                            </td>
                            <td>{$vo['last_login_time']}</td>
                            <td>{$vo['last_login_ip']}</td>
                            <td><a href="{:U('Admin/agent/get_rate_update_log',array('id'=>$vo['admin_id']))}" title="查看修改记录" style="cursor:pointer" class="m">点击查看记录</a></td>
                            <td>
                                <if condition="$vo.status eq 1">
                                    正常
                                <else/>
                                    <font color="red">禁用</font>
                                </if>
                            </td>

                            <td>
                                <a href="{:U('agent/get_children_agent_list',array('id'=>$vo['admin_id']))}"> 查看下级代理</a>|
                                <a href="{:U('agent/get_children_user_list',array('id'=>$vo['admin_id']))}"> 查看下级会员</a>
                            </td>
                        </tr>
                    </foreach>
                </tbody>
            </table>
            <div class="pageers">
                <ul>
                    {$show}
                </ul>
            </div>
        </div>
    </div> 
    <script type="text/javascript" src="__ADMIN_JS__/common.js"></script>
</body>
</html>
